package en.edu.scau.cmi.zhanzhiyong.carpter05;

public class Rectangle {
	double x, y, width, height;
	
	public void setX(double x) {
		this.x = x;
	}
	public double getX() {
		return x;
	}
	
	public void setY(double y) {
		this.y = y;
	}
	public double getY() {
		return y;
	}
	
	public void setWidth(double w) {
		if(w>0)
		width = w;
		else
			width = 0 ;
	}
	public double getWidth() {
		return width;
	}
	
	public void setHeight(double h) {
		height = h;
	}
	public double getHeight() {
		return height;
	}
	
}

